package zzps.exeed.kernel.holder;

public class FieldValueInjector extends ValueInjector{

    private final FieldHolder fieldHolder;

    public FieldValueInjector(FieldHolder fieldHolder) {
        this.fieldHolder = fieldHolder;
    }

    @Override
    public void setValue(Object value) {
        if (value != null){
            fieldHolder.setValue(value);
        }
        ready(true);
    }

    @Override
    public Object getValue() {
        return fieldHolder.getValue();
    }

    @Override
    public Class<?> getType() {
        return fieldHolder.getType();
    }
}
